【单选题】
下列程序的运行结果是( )。
public class test{
private String[]data={¨10","10.5"},
public void fun()(
double S=0;
for(int i=0;i<3;i++){
try{
s=s+Integer.parseInt(data[i]);
catch(Exception e){
System.out.print(“errorl:”+data[i])。
}
}
}
public static void main(string[]args){
try{
test d=new test();
d.fun();
}catch(Exception e){
System.out.println("error2")
}
}
}
A.errorl:10.5
B.error2
C.errorl:10.5 error2
D.以上都不对
查看答案解析
参考答案:
正在加载...
答案解析
正在加载...
根据网考网移动考试中心的统计,该试题:
8%的考友选择了A选项
0%的考友选择了B选项
85%的考友选择了C选项
7%的考友选择了D选项